package com.ellwood.copyright.modules.system.service;

import com.ellwood.copyright.common.core.base.ServiceFactory;
import com.ellwood.copyright.common.core.result.EllPageResult;
import com.ellwood.copyright.infrastructure.system.entity.SysUserEntity;
import com.ellwood.copyright.infrastructure.system.query.SysUserQuery;
import com.ellwood.copyright.infrastructure.system.vo.SysUserDataVO;
import jakarta.validation.Valid;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;

/**
 * @ProjectName: ell-copyright-pro
 * @PackageName: com.ellwood.copyright.modules.system.service
 * @ClassName: SysUserService
 * @Description: // 用户service接口
 * @Author: Ellwood
 * @CreateDate: 2024/11/20 - 22:36
 * @Version: V1.0.0
 */
public interface SysUserService  extends ServiceFactory<SysUserEntity> {

    /**
     * 查询所有，根据条件查询，不分页
     * @param userQuery 查询条件
     * @return 返回查询结果
     */
    EllPageResult<SysUserDataVO> findAll(@Valid SysUserQuery userQuery);

    /**
     * 新增用户
     * @param userVo 用户信息
     * @return 返回新增成功
     */
    int userSave(@Valid SysUserDataVO userVo);

    /**
     * 更新用户
     * @param userVo 用户信息
     * @return 返回更新成功
     */
    int editUser(@Valid SysUserDataVO userVo);

    /**
     * 到处数据
     * @param filePath 导出存放的路径
     * @param fileName 导出文件名称
     * @throws Exception 异常
     */
    void exportByUsers(String filePath,String fileName)throws Exception;

    /**
     * 导入数据
     * @param file 导入数据的excel文件
     * @throws Exception 导入异常
     */
    void importByUsers(MultipartFile file) throws Exception;

}
